package lab03;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Watchable;

public class test00 {
    public static void main(String[] args) throws IOException {
        String path="D:\\hello.txt";
        BufferedWriter writer=new BufferedWriter(new FileWriter(path));
        try {
            writer = new BufferedWriter(new FileWriter(path));
            writer.write("hello,world");
            writer.newLine();

            writer.write("101010011010010");
            writer.newLine();

            writer.write("bye!!");
        }
        catch (IOException e) {
            e.printStackTrace();
        }finally
        {try {
            writer.close();

        }catch (IOException e){
            e.printStackTrace();
        }


        }
    }
}
